#include "GlobalFlag.h"

#include "XmlManager.h"
GlobalFlag::GlobalFlag()
{
	LoadDataFromXml();
}
GlobalFlag::~GlobalFlag()
{

}
void GlobalFlag::LoadDataFromXml()
{
	mConfig.gcApproachingValue = XMLManager::getSingleton().GetGlobalApproachingValue();
	mConfig.gcBeizerAddPointSpeed = XMLManager::getSingleton().GetGlobalBeizerSpeedValue();
	mConfig.gcBirdMoveLength = XMLManager::getSingleton().GetGlobalBirdMoveLengthValue();
	mConfig.gcBirdMoveSpeed = XMLManager::getSingleton().GetGlobalBirdSpeedValue();
	mConfig.gcBottomWallMinValue = XMLManager::getSingleton().GetGlobalBottomWallValue();
	mConfig.gcCollisionJudgeValue = XMLManager::getSingleton().GetGlobalCollThresholdValue();
	mConfig.gcNumFrameBirdCatched = XMLManager::getSingleton().GetGlobalBirdCatchedNumFrameValue();
	mConfig.gcNumFrameBirdFlying = XMLManager::getSingleton().GetGlobalBirdFlyingNumFrameValue();
	mConfig.gcNumFrameBirdReadyForFly = XMLManager::getSingleton().GetGlobalBirdReadyFlyNumFrameValue();
	mConfig.gcNumFrameBirdSafelyInNest = XMLManager::getSingleton().GetGlobalBirdSafelyNumFrameValue();
	mConfig.gcNumFrameBirdWin = XMLManager::getSingleton().GetGlobalBirdWinNumFrameValue();
	mConfig.gcUpWallMaxValue = XMLManager::getSingleton().GetGlobalUpWallValue();
	mConfig.gcWinEffectLastTime = XMLManager::getSingleton().GetGlobalEffectTimeValue();
	mConfig.gcNumFrameEagleLose = XMLManager::getSingleton().GetGlobalEagleLoseNumFrameValue();
	mConfig.gcBirdTotalNum = XMLManager::getSingleton().GetGlobalBirdCountsValue();
	mConfig.gcNumFrameBirdDepress = XMLManager::getSingleton().GetGlobalBirdDepressNumFrameValue();
}
